package com.ep.framelibrary.http;

import com.ep.baselibrary.http.EngineCallBack;
import com.ep.baselibrary.http.HttpUtils;
import com.google.gson.Gson;

/**
 * Created by Administrator on 2017/7/4.
 */

public abstract class HttpCallBack<T> implements EngineCallBack {
    @Override
    public void onSuccess(String result) {
        Gson gson=new Gson();
        T resultObj=(T)gson.fromJson(result, HttpUtils.analysisClazzInfo(this));
        onSuccess(resultObj);
    }
    //直接返回对象
    public abstract void onSuccess(T Obj);
}
